/*
 * @Descripttion:
 * @Author: Cxy
 * @Date: 2023-02-07 10:34:33
 * @LastEditors: Cxy
 * @LastEditTime: 2024-02-21 22:14:21
 * @FilePath: \blogAdmin\play\src\components\index.ts
 */
import type { App, Plugin } from 'vue'

const importCom = import.meta.glob(['./*/index.ts'], {
  import: 'default',
  eager: true
})

/**
 * @description: 需要全局注册的组件
 * @param {Array<Plugin>}
 */
const com: Array<any> = Object.values(importCom)

export default (app: App) => com.forEach((com: Plugin) => app.use(com))
